package command;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wcj
 * @Date 2021/7/8 23:00
 * @Version 1.0
 */
public class Waiter {

    private List<Barbecue> barbecueList = new ArrayList<>();

    public void addBarbecue(Barbecue barbecue) {
        barbecueList.add(barbecue);
    }

    public void execute() {
        for (Barbecue barbecue : barbecueList) {
            barbecue.barbecue();
        }
        barbecueList.clear();
    }

}
